package cn.stimd.spring.ui;

import java.util.LinkedHashMap;

/**
 * 使用建造模式来构建Model，支持链式调用
 * <p>
 * Created by Stimd
 * 项目地址：https://gitee.com/stimd/spring-wheel
 * 公众号：Java编程探微
 */
public class ModelMap extends LinkedHashMap<String, Object> {

    public ModelMap addAttribute(String attributeName, Object attributeValue) {
        put(attributeName, attributeValue);
        return this;
    }

    public boolean containsAttribute(String attributeName) {
        return containsKey(attributeName);
    }
}
